package menu

import (
	"mldong/api/base"

	"github.com/gogf/gf/v2/frame/g"
)

type SaveReq struct {
	g.Meta `path:"/sys/menu/save" tags:"菜单管理" method:"post" summary:"添加菜单"`
	MenuParam
}
type UpdateReq struct {
	g.Meta `path:"/sys/menu/update" tags:"菜单管理" method:"post" summary:"修改菜单"`
	MenuParam
}
type DetailReq struct {
	g.Meta `path:"/sys/menu/detail" tags:"菜单管理" method:"post" summary:"菜单详情"`
	ID     string `json:"id" dc:"菜单ID" v:"required#请输入菜单ID"`
}

type DetailRes struct {
	base.CommonResult
	Data MenuVO `json:"data" dc:"菜单信息"`
}
type RemoveReq struct {
	g.Meta `path:"/sys/menu/remove" tags:"菜单管理" method:"post" summary:"删除菜单"`
	Ids    []string `json:"ids" dc:"菜单ID集合" v:"required#请输入菜单ID集合|min-length:1"`
}
type PageReq struct {
	g.Meta `path:"/sys/menu/page" tags:"菜单管理" method:"post" summary:"菜单分页查询"`
	base.PageParam
}
type ListReq struct {
	g.Meta `path:"/sys/menu/list" tags:"菜单管理" method:"post" summary:"菜单列表"`
	base.PageParam
}
type TreeReq struct {
	g.Meta `path:"/sys/menu/tree" tags:"菜单管理" method:"post" summary:"菜单树"`
	base.PageParam
}
type AppListReq struct {
	g.Meta `path:"/sys/menu/appList" tags:"菜单管理" method:"post" summary:"应用列表"`
}

type SyncRouteReq struct {
	g.Meta `path:"/sys/menu/syncRoute" tags:"菜单管理" method:"post" summary:"同步前端路由" description:"入参为数组对象"`
	SyncRouteParam
}
type Vben5Req struct {
	g.Meta `path:"/menu/all" tags:"菜单管理" method:"get" summary:"获取用户菜单-v5版" description:"vben5版"`
	SyncRouteParam
}
type Vben2Req struct {
	g.Meta `path:"/getMenuList" tags:"菜单管理" method:"get" summary:"获取用户菜单-v2版" description:"vben2版"`
	SyncRouteParam
}
type ArtDesignPro struct {
	g.Meta `path:"/getArtDesignMenu" tags:"菜单管理" method:"get" summary:"获取用户菜单-art-design-pro版" description:"art-design-pro版"`
	SyncRouteParam
}
type MenuPageVO struct {
	base.PageVO
	Rows []MenuVO `json:"rows" dc:"数据列表"`
}
type PageRes struct {
	base.CommonResult
	Data MenuPageVO `json:"data" dc:"菜单分页返回实体"`
}
type ListRes struct {
	base.CommonResult
	Data []MenuVO `json:"data" dc:"菜单返回列表实体"`
}
type TreeRes struct {
	base.CommonResult
	Data []MenuVO `json:"data" dc:"菜单返回树实体"`
}
type AppListRes struct {
	base.CommonResult
	Data []base.LabelValueVO `json:"data" dc:"应用列表实体"`
}
type RouteMenuRes struct {
	base.CommonResult
	Data []RouteMenuVO `json:"data" dc:"返回路由菜单实体"`
}
